<script>
import { onMounted } from 'vue';

    export default{
        data(){},
        methods:{
            searchKey:function(){
                console.log("123")
            },
            //调用后端接口示例
            ExampleFunction(){
                //接口位置
                this.$axios.get('http://localhost:......').
                then(
                    response => {

                    }
                )
            }
            //调用后端接口示例
        },
        mounted(){
            this.ExampleFunction()//挂载该函数
        }
    }
</script>

<template>
    <div class="wrap" id="app">
      <div class="search_form">
        
        <div class="logo">
          关键词搜索引擎
        </div>
        <div class="form_group">
          <input type="text" class="input_txt" placeholder="输入查询内容" @keyup.enter="searchKey">
          <button class="button" v-on:click="searchKey">搜索</button>
        </div>

      </div>

    </div>
</template>

<style scoped>
.wrap {
    text-align: center;
    background-color: antiquewhite;
    font-family: "Montserrat", sans-serif;
    background: rgb(255, 255, 255);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    
    background-size: cover;
}

.search_form{
    border-radius: 10px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
    position: absolute;
    overflow: hidden;
    width: 768px;
    background: rgb(55, 65, 68);;
    max-width: 100%;
    min-height: 480px;
    opacity: 0.8;
}
.button{
    cursor: pointer;
  border-radius: 20px;
  /* border: 1px solid #ff4b2b;
  background: #ff4b2b; */
  /* border: 1px solid #fa8817;
  background: #fa8817; */
    border: 1px solid #1BBFB4;
  background: #1BBFB4;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 12px 45px;
  margin-top: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: transform 80ms ease-in;
}
.logo{
    font-family: "PLay", sans-serif;
    font-weight: bold;
    margin: 0;
    font-size: 20px;
    color: beige;
}
.input_txt{
  width: 240px;
  text-align: center;
  background: transparent;
  border: none;
  border-bottom: 1px solid #fff;
  font-family: "PLay", sans-serif;
  font-size: 16px;
  font-weight: 200px;
  padding: 10px 0;
  transition: border 0.5s;
  outline: none;
  color: #fff;
  font-weight: bold;
  
}
</style>